var testData = Array.from({length: 5000}, () => Math.round(Math.random() * 10) )

var res = testData

for (let i=0; i<res.length; i++) {
    for (let j=i+1; j < res.length; j++) {
        if (res[j] === res[i]) {
            res.splice(j, 1)
            j--
        }
    }
}

console.log(res)
